package com.colorfruit.framework.model.sys;

import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * 业务描述：
 *
 * @Auther: chenjiayuan
 * @Date: create in 2018/7/6 13
 * @Description:
 */
@NoArgsConstructor
@ToString
@Data
public class ValidateException extends RuntimeException{
    private static final long serialVersionUID = 1L;
    /**
     *	错误码
     */
    @Getter
    private String errorCode;

    public ValidateException(String message) {
        super(message);
    }

    public ValidateException(String message, Throwable cause) {
        super(message, cause);
    }

    public ValidateException(String message, String errorCode) {
        super(message);
        this.errorCode = errorCode;
    }

    public ValidateException(String message, Throwable cause, String errorCode) {
        super(message, cause);
        this.errorCode = errorCode;
    }

    public ValidateException(Throwable cause, String errorCode) {
        super(cause);
        this.errorCode = errorCode;
    }

    public ValidateException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace,
                             String errorCode) {
        super(message, cause, enableSuppression, writableStackTrace);
        this.errorCode = errorCode;
    }
}
